diff options
Diffstat (limited to 'app/[lng]/engineering/(engineering)/project-gtc/page.tsx')
| -rw-r--r-- | app/[lng]/engineering/(engineering)/project-gtc/page.tsx | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/app/[lng]/engineering/(engineering)/project-gtc/page.tsx b/app/[lng]/engineering/(engineering)/project-gtc/page.tsx new file mode 100644 index 00000000..8e12a489 --- /dev/null +++ b/app/[lng]/engineering/(engineering)/project-gtc/page.tsx @@ -0,0 +1,63 @@ +import * as React from "react" +import { type SearchParams } from "@/types/table" + +import { Skeleton } from "@/components/ui/skeleton" +import { DataTableSkeleton } from "@/components/data-table/data-table-skeleton" +import { Shell } from "@/components/shell" +import { getProjectGtcList } from "@/lib/project-gtc/service" +import { projectGtcSearchParamsSchema } from "@/lib/project-gtc/validations" +import { ProjectGtcTable } from "@/lib/project-gtc/table/project-gtc-table" + +interface IndexPageProps { + searchParams: Promise<SearchParams> +} + +export default async function IndexPage(props: IndexPageProps) { + const searchParams = await props.searchParams + const search = projectGtcSearchParamsSchema.parse(searchParams) + + const promises = Promise.all([ + getProjectGtcList({ + page: search.page, + perPage: search.perPage, + search: search.search, + sort: search.sort, + }), + ]) + + return ( + <Shell className="gap-2"> + <div className="flex items-center justify-between space-y-2"> + <div className="flex items-center justify-between space-y-2"> + <div> + <h2 className="text-2xl font-bold tracking-tight"> + Project GTC + </h2> + <p className="text-muted-foreground"> + 프로젝트별 GTC(General Terms and Conditions) 파일을 관리할 수 있습니다. + 각 프로젝트마다 하나의 GTC 파일을 업로드할 수 있으며, 파일 업로드 시 기존 파일은 자동으로 교체됩니다. + </p> + </div> + </div> + </div> + + <React.Suspense fallback={<Skeleton className="h-7 w-52" />}> + {/* 추가 기능이 필요하면 여기에 추가 */} + </React.Suspense> + + <React.Suspense + fallback={ + <DataTableSkeleton + columnCount={8} + searchableColumnCount={1} + filterableColumnCount={2} + cellWidths={["3rem", "3rem", "12rem", "20rem", "10rem", "20rem", "15rem", "12rem", "3rem"]} + shrinkZero + /> + } + > + <ProjectGtcTable promises={promises} /> + </React.Suspense> + </Shell> + ) +}
\ No newline at end of file |
